//
//  AKUIManager.m
//  GSCalendar
//
//  Created by GSmini on 2018/9/18.
//  Copyright © 2018年 tanyin. All rights reserved.
//
//  414x896pt => xs max,xr
//  414x736pt => 6 plus, 7 plus, 8 plus
//  375x812pt => x, xs
//  375x667pt => 6, 7, 8
//  320x568pt => 5, se
//  320x480pt => 4

#import "AKUIManager.h"

@implementation AKUIManager
{
    CGFloat _mHeightStatusBar;
    CGFloat _mHeightNaviBar;
    CGFloat _mHeightBottomSafe;
    CGFloat _mHeightTabBar;
}

+ (instancetype)shared {
    static dispatch_once_t onceToken;
    static AKUIManager *instance = nil;
    dispatch_once(&onceToken,^{
        instance = [[super allocWithZone:NULL] init];
    });
    return instance;
}

+ (id)allocWithZone:(struct _NSZone *)zone{
    return [self shared];
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        
        _mHeightStatusBar = ((IS_IPHONE_X_58==YES || IS_IPHONE_X_61 ==YES || IS_IPHONE_X_65== YES) ? 44.0 : 20.0);
        _mHeightNaviBar = ((IS_IPHONE_X_58==YES || IS_IPHONE_X_61 ==YES || IS_IPHONE_X_65== YES) ? 88.0 : 64.0);
        
        _mHeightBottomSafe = ((IS_IPHONE_X_58==YES || IS_IPHONE_X_61 ==YES || IS_IPHONE_X_65== YES) ? 34.0 : 0.0);
        _mHeightTabBar = ((IS_IPHONE_X_58==YES || IS_IPHONE_X_61 ==YES || IS_IPHONE_X_65== YES) ? 88.0 : 64.0);
    }
    return self;
}

- (CGFloat)heightStatusBar {
    
    return _mHeightStatusBar;
}

- (CGFloat)heightNaviBar {
    return _mHeightNaviBar;
}

- (CGFloat)heightBottomSafe {
    return _mHeightBottomSafe;
}

- (CGFloat)heightTabBar {
    return _mHeightTabBar;
}
@end
